﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BuildPlannerLib
{
    // Class for units that includes cost and production time data
    public class Unit
    {
        // String property for the name of the unit
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        // Integer properties for the cost and time duration of the unit
        private int mineralCost;
        private int gasCost;
        private int supplyCost;
        private int timeDuration;
        public int MineralCost
        {
            get { return mineralCost; }
            set { mineralCost = value; }
        }
        public int GasCost
        {
            get { return gasCost; }
            set { gasCost = value; }
        }
        public int SupplyCost
        {
            get { return supplyCost; }
            set { supplyCost = value; }
        }
        public int TimeDuration
        {
            get { return timeDuration; }
            set { timeDuration = value; }
        }

        // Integer property for the number of units produced
        private int count;
        public int Count
        {
            get { return count; }
            set { count = value; }
        }

        // String properties for the production building and requirement building
        private string producedFrom;
        private string requirement;
        public string ProducedFrom
        {
            get { return producedFrom; }
            set { producedFrom = value; }
        }
        public string Requirement
        {
            get { return requirement; }
            set { requirement = value; }
        }

        // Adds a unit to the count
        public void Add()
        {
            Count++;
        }
    }
}
